package com.huawei.classroom.student.h06;

public class WarFactory extends Base{
	public WarFactory(int x,int y) {
		super(100,0,0,x,y);
	}
	public Tank building(EnumObjectType built) {
		if(built==EnumObjectType.mediumTank) {
			return new MediumTank(this.x,this.y);
		}
		else if(built==EnumObjectType.heavyTank) {
			return new HeavyTank(this.x,this.y);
		}
		else return null;
	}
}